package com.ruibang.glass.produce.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ruibang.glass.produce.domain.req.DeviceAlarmReq;
import com.ruibang.glass.produce.entity.DeviceAlarm;
import com.ruibang.glass.produce.service.DeviceAlarmService;
import com.teaming.cloud.framework2.common.model.ResultBody;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: songJinKang
 * @CreateTime: 2024-05-04  19:50
 * @Description: TODO
 * @Version: 1.0
 */

@RestController
@RequestMapping("/api/produce/device/alarm")
@Api(value = "生产设备报警信息 ", tags = {"生产设备报警信息"})
public class DeviceAlarmController {

    @Autowired
    private DeviceAlarmService deviceAlarmService;

    @PostMapping("pageQuery")
    @ApiOperation(value = "查询设备报警记录", notes = "查询设备报警记录")
    public ResultBody<IPage<DeviceAlarm>> pageQuery(@RequestBody DeviceAlarmReq deviceAlarmReq) {
        return ResultBody.success(deviceAlarmService.pageQuery(deviceAlarmReq));
    }

}
